﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Skywave.Web.UI
{
    public abstract class Basic_Page<T> : System.Web.UI.Page where T : Basic
    {
        private T _Basic = null;
        /// <summary>
        /// ...
        /// </summary>
        public T Basic
        {
            get
            {
                if (_Basic == null)
                {
                    Basic_MasterPage<T> owner1 = this.Master as Basic_MasterPage<T>;
                    if (owner1 == null)
                    {
                        _Basic = CreateBasic();
                    }
                    else
                    {
                        _Basic = owner1.Basic;
                    }
                }
                return _Basic;
            }
        }
        public abstract T CreateBasic();
    }
}
